package com.hopu.oa.service.impl.process;

import com.hopu.oa.dao.process.BursementDao;
import com.hopu.oa.entity.management.AoaTypeList;
import com.hopu.oa.entity.process.*;
import com.hopu.oa.entity.user.AoaUser;
import com.hopu.oa.service.process.BursementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("BursementService")
public class BursementServiceImpl implements BursementService {
    @Autowired
    private BursementDao bursementDao;

    @Override
    public List<AoaTypeList> selectTypeList() {
        return bursementDao.selectTypeList();
    }

    @Override
    public AoaBursement selectAllBursement(Integer processId) {
        return bursementDao.selectAllBursement(processId);
    }

    @Override
    public AoaTypeList selectByTypeId(Integer typeId) {
        return bursementDao.selectByTypeId(typeId);
    }


    @Override
    public List<AoaProcessList> selectAll(Integer userId, String baseKey, Integer index, Integer size) {
        return bursementDao.selectAll(userId, baseKey, index, size);
    }

    @Override
    public AoaProcessList selectById(Integer id) {
        return bursementDao.selectById(id);
    }

    @Override
    public AoaHoliday selectByProID(Integer id) {
        return bursementDao.selectByProID(id);
    }

    @Override
    public AoaHoliday selectByID(Integer proId) {
        return bursementDao.selectByID(proId);
    }

    @Override
    public AoaOvertime selectOverAndTypeById(Integer prcId) {
        return bursementDao.selectOverAndTypeById(prcId);
    }

    @Override
    public AoaOvertime selectByProId(Integer proId) {
        return bursementDao.selectByProId(proId);
    }

    @Override
    public List<AoaTraffic> selectTrafficBy(Integer EvectionmoneyId) {
        return bursementDao.selectTrafficBy(EvectionmoneyId);
    }

    @Override
    public List<AoaStay> selectStayByEvectionmoneyId(Integer EvectionmoneyId) {
        return bursementDao.selectStayByEvectionmoneyId(EvectionmoneyId);
    }

    @Override
    public AoaEvectionmoney selectEvectionmoneyByProcessId(Integer processId) {
        return bursementDao.selectEvectionmoneyByProcessId(processId);
    }

    @Override
    public AoaEvection selectEvectionByProcessId(Integer processId) {
        return bursementDao.selectEvectionByProcessId(processId);
    }

    @Override
    public List<AoaDetailsburse> selectByBursementIdAfter(Integer BursementId) {
        return bursementDao.selectByBursementIdAfter(BursementId);
    }

    @Override
    public AoaRegular selectRegularByProcessId(Integer processId) {
        return bursementDao.selectRegularByProcessId(processId);
    }

    @Override
    public int ManagerAdviceBursement(Integer proId, String managerAdvice) {
        return bursementDao.ManagerAdviceBursement(proId, managerAdvice);
    }

    @Override
    public int ManagerAdviceOvertime(Integer proId, String managerAdvice) {
        return bursementDao.ManagerAdviceOvertime(proId, managerAdvice);
    }

    @Override
    public int ManagerAdviceEvection(Integer proId, String managerAdvice) {
        return bursementDao.ManagerAdviceEvection(proId, managerAdvice);
    }

    @Override
    public int personneAdviceEvection(Integer proId, String personnelAdvice) {
        return bursementDao.personneAdviceEvection(proId, personnelAdvice);
    }


    @Override
    public int ManagerAdviceResign(Integer proId, String managerAdvice) {
        return bursementDao.ManagerAdviceResign(proId, managerAdvice);
    }

    @Override
    public int FinancialAdviceResign(Integer proId, String financialAdvice) {
        return bursementDao.FinancialAdviceResign(proId, financialAdvice);
    }


    @Override
    public int ManagerAdviceRegular(Integer proId, String managerAdvice) {
        return bursementDao.ManagerAdviceRegular(proId, managerAdvice);
    }


    @Override
    public int ManagerAdviceHoliday(Integer proId, String managerAdvice) {
        return bursementDao.ManagerAdviceHoliday(proId, managerAdvice);
    }

    @Override
    public int ManagerAdviceEvectionMoney(Integer proId, String managerAdvice) {
        return bursementDao.ManagerAdviceEvectionMoney(proId, managerAdvice);
    }

    @Override
    public int FinancialAdviceEvectionMoney(Integer proId, String financialAdvice) {
        return bursementDao.FinancialAdviceEvectionMoney(proId, financialAdvice);
    }

    @Override
    public int personneAdviceHoliday(Integer proId, String personnelAdvice) {
        return bursementDao.personneAdviceHoliday(proId, personnelAdvice);
    }

    @Override
    public int personneAdviceRegular(Integer proId, String personnelAdvice) {
        return bursementDao.personneAdviceRegular(proId, personnelAdvice);
    }

    @Override
    public int personneAdviceResign(Integer proId, String personnelAdvice) {
        return bursementDao.personneAdviceResign(proId, personnelAdvice);
    }

    @Override
    public int personneAdviceOvertime(Integer proId, String personnelAdvice) {
        return bursementDao.personneAdviceOvertime(proId, personnelAdvice);
    }

    @Override
    public int FinancialAdviceBursement(Integer proId, String financialAdvice) {
        return bursementDao.FinancialAdviceBursement(proId, financialAdvice);
    }

    @Override
    public AoaResign selectResignByByProcessId(Integer processId) {
        return bursementDao.selectResignByByProcessId(processId);
    }

    @Override
    public AoaUser selectByProcessUserIdAfter(Integer userId) {
        if (userId != null) {
            return bursementDao.selectByProcessUserIdAfter(userId);
        } else {
            return null;
        }
    }
}
